using System;
using System.Collections.Generic;
using Common.Unity.Extensions.PropertyMapper.Policies;
using Microsoft.Practices.ObjectBuilder2;
using Common.Unity.Extensions;

namespace Common.Unity.Extensions.PropertyMapper
{
	public class ReflectionPropertyMappingStrategy : PropertyMappingStrategyBase
	{
		protected override IEnumerable<IPropertyMappingPolicy> ResolvePolicies( IBuilderContext context,
		                                                                        PropertyMappingKey key )
		{
			yield return context.GetEnsuredPolicy<ReflectionPropertyMappingPolicy, ReflectionPropertyMappingPolicy>();
		}
	}
}